package org.jspar.tile;


public class MutableTileDelegate implements ITileDelegate {
	
	private ITileDelegate delegate;
	
	public MutableTileDelegate() {
		this(DefaultTileDelegate.INSTANCE);
	}

	public MutableTileDelegate(ITileDelegate instance) {
		delegate = instance;
	}
	
	public void setDelegate(ITileDelegate delegate) {
		this.delegate = delegate;
	}

	@Override
	public void insertContents(Tile tile, ITileContent what) {
		delegate.insertContents(tile, what);
	}

	@Override
	public boolean isContentEquivalent(Tile t, Tile rt) {
		return delegate.isContentEquivalent(t, rt);
	}

	@Override
	public boolean isSolid(Tile tile) {
		return delegate.isSolid(tile);
	}

	@Override
	public void manageContentsDeadTile(Tile temp) {
		delegate.manageContentsDeadTile(temp);
	}

	@Override
	public void manageContentsHmerge(Tile t, Tile temp) {
		delegate.manageContentsHmerge(t, temp);
	}

	@Override
	public void manageContentsHsplit(Tile p, Tile c) {
		delegate.manageContentsHsplit(p, c);
	}

	@Override
	public void manageContentsVmerge(Tile t, Tile temp) {
		delegate.manageContentsVmerge(t, temp);
	}

	@Override
	public void manageContentsVsplit(Tile p, Tile c) {
		delegate.manageContentsVsplit(p, c);
	}

}
